<?php	 
	include('handler_bd.php');
	session_start();	
	$opciones = array();
	$visibles = $conn->query("SELECT clave as Clase FROM Configuracion WHERE tipo='display'");
	foreach($visibles as $row){
		if(isset($_POST[$row['Clase']])){
  				$result=$conn->prepare("UPDATE Configuracion SET valor='true',tipo='display' WHERE clave='$row[Clase]'");
				$result->execute();
			}else{
				$result=$conn->prepare("UPDATE Configuracion SET valor='false',tipo='display' WHERE clave='$row[Clase]'");
				$result->execute();
			}
		
	}
	$count=$_POST['inputPaginas'];
	$rta=$conn->prepare("UPDATE Configuracion SET valor=$count,tipo='cantidad' WHERE clave='prop-por-pag'");
	$rta->execute();
	echo "<script>	top.location.href='index.php';</script>";

?>
